question

jacopo-r avatar image
0 Likes"
jacopo-r asked jacopo-r commented

FlexSim crashes while running external Python code

Hi,

I have a FlexSim model that is connected to a python file that aims to do some optimization. Unfortunately, I cannot share the files.

My issue is that, while the model was working and running the optimization until a couple of days ago, it now crashes every time the system has to execute the line of code that runs the external code.

Does anyone have any idea why it was working and it doesn't work anymore?

These are my computer specs and they should be ok for doing what I am doing. (when it was working, the running of the external code was taking around 15 sec after I pressed the Run Model button)
Processor: 12th Gen Intel(R) Core(TM) i7 2.10 GHz
RAM: 32 GB

FlexSim 24.0.1
pythonconnect to external code
· 14
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
We're going to have trouble assisting you if we can't reproduce the problem. Would you be able to post the model and python module if you made the post private?
0 Likes 0 ·
jacopo-r avatar image jacopo-r Jason Lightfoot ♦ commented ·

Hi @Jason Lightfoot,

I just tried to run a very simple python code form flexsim and it also crashed. I am sharing this simple function (which was working). So it is something general and not just related to a specific model. What should I check? The pyhton version selected in the flexsim global preferences is the same one I have installed in my PC, and the python path is added to PATH.

Thanks in advance.

Reading_Flexsim_Table.pyPython_reading_table.fsm

0 Likes 0 ·
jacopo-r avatar image jacopo-r Jason Lightfoot ♦ commented ·
Hi again @Jason Lightfoot , any new comments on my issue?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ jacopo-r commented ·
We were able to run the python code (once we ensured the pyhon filename case matched that in your code) so it's likely a system issue. Can you describe your 'crash' in more detail? Can you try a different Python version and check everything is supported and set up correctly on your machine?
0 Likes 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @jacopo-r,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
jacopo-r avatar image jacopo-r Jeanette F ♦♦ commented ·
Hi @Jeanette F ,


I did not have the chance to try with a personal PC as Lars suggested.
I ended up not using the flexsim-python connection, because that still made the flexsim app to shut down.

So, the problem has not been fixed from my side and I don't know when I will have some time to take a look at it again.

There is no real answer to accept as a solution for this post, so please do what you think is the best with this question.


BR,

Jacopo

0 Likes 0 ·
Lars Christian J2 avatar image Lars Christian J2 jacopo-r commented ·

@jacopo_r . Try an installing a slightly older version of Python and change the windows python path


Python application path

0 Likes 0 ·
Show more comments

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.